package org.example.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RedisListener extends MessageListenerAdapter {
    @Override
    public void onMessage(Message message, byte[] bytes) {
        String channel = new String(message.getChannel());
        log.info(channel);
        log.info(message.toString());
    }
    
    
}
